package com.google.code.p.restrpc.client.event;

import com.google.code.p.restrpc.core.async.AsyncRpcResultRetriever;
import com.google.code.p.restrpc.event.RpcEventObject;

/**
 * @author dz
 */
public class AsyncRpcEventObject extends RpcEventObject {
    
    private String queryUrl;
    
    private AsyncRpcResultRetriever query;
    
    /**
     * @param requestId
     * @param queryUrl
     * @param query
     */
    public AsyncRpcEventObject(String requestId,
                               String queryUrl,
                               AsyncRpcResultRetriever query) {
        super(requestId);
        this.queryUrl = queryUrl;
        this.query = query;
    }
    
    /**
     * @return the asyncRequestId
     */
    public String getAsyncRequestId() {
        return (String) getSource();
    }
    
    /**
     * @return the requestUrl
     */
    public String getQueryUrl() {
        return queryUrl;
    }
    
    /**
     * @return the asyncRpcResultQuery
     */
    public AsyncRpcResultRetriever getAsyncRpcResultQuery() {
        return this.query;
    }
    
}
